import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Product from "@/components/Product";
import Rest from "@/components/Rest";
import Cangku from "@/components/Cangku";
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path:'/product/:id',
      name:'Product',
      component:Product
    },
    {
      path:'/rest',
      name:'rest',
      component:Rest
    },
    {
      path:'/cangku/:number',
      name:'cangku',
      component:Cangku
    }

  ],
  // mode 修改路由规则,hash是路径带#一般用于调试
  // mode:history 路径不带# 一般用于发布
  mode:'history'
})
